<h1>学员详细信息</h1>
<div id="student-details">
  <h2>详细信息</h2>
  <table>
    <tr>
      <td>姓名:<%= @student.name %></td>
      <td>学号:<%= @student.sid %></td>
      <td>出生日期:<%= @student.birthday %></td>
    </tr>
  </table>
</div>
<div id="courseCards">
  <h2>课程卡</h2>
  <% if @student.courseCards.empty? %>
    未缴费
  <% else %>
      <table>
        <thead>
          <tr>
            <th>课程</th>
            <th>剩余次数</th>
          </tr>
        </thead>
        <tbody>
     <% @student.courseCards.each do |card| %>
       <tr>
         <td><%= card.course.name %></td>
         <td><%= card.amount %></td>
       </tr>
     <% end %>
        </tbody>
      </table>
  <% end %>
</div>
<div id="student-operation">
  <%=link_to "缴费", {:action => 'pay',:id=> @student} %>
</div>
